package com.lantosec.hmrp.modules.sysdata.vo;

import java.util.Date;

import com.lantosec.hmrp.modules.sysdata.entity.SysDataProcess;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 系统数据流程关联表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysDataProcess对象", description="系统数据流程关联表")
public class SysDataProcessVO extends BaseVO<SysDataProcess> {
    private static final long serialVersionUID = 1L;


    public SysDataProcessVO(SysDataProcess entity){
        this.dataProcessId = entity.getDataProcessId();
        this.proInsId = entity.getProInsId();
        this.proInsName = entity.getProInsName();
        this.formTableId = entity.getFormTableId();
        this.dataId = entity.getDataId();
        this.dataSourceTableSchema = entity.getDataSourceTableSchema();
        this.dataSourceTableName = entity.getDataSourceTableName();
        this.dataSourceTableName = entity.getDataSourceTableName();
        this.currentTaskId = entity.getCurrentTaskId();
        this.createTime = entity.getCreateTime();
        this.finishTime = entity.getFinishTime();
    }

    @Override
    public SysDataProcess convertToEntity(){
        return new SysDataProcess(this);
    }


    @ApiModelProperty(value = "系统数据流程ID")
    private String dataProcessId;

    @ApiModelProperty(value = "Flowable中对应的流程实例ID")
    private String proInsId;

    @ApiModelProperty(value = "流程实例名称")
    private String proInsName;

    @ApiModelProperty(value = "流程的数据表单ID")
    private String formTableId;

    @ApiModelProperty(value = "流程实例对应的数据表记录Id")
    private String dataId;

    @ApiModelProperty(value = "流程实例对应的数据源表所在数据库")
    private String dataSourceTableSchema;

    @ApiModelProperty(value = "流程实例对应的数据源表名")
    private String dataSourceTableName;

    @ApiModelProperty(value = "当前任务节点Id")
    private String currentTaskId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "完成时间")
    private Date finishTime;


}
